Skip to content

Replace --persist flag with REPLACE_PLAYLIST .env, Remove stale persist toggles#191

Open
dammitjeff wants to merge 5 commits into
LumePart:devfrom
dammitjeff:remove-stale-persist-toggles
Open

Replace --persist flag with REPLACE_PLAYLIST .env, Remove stale persist toggles#191
dammitjeff wants to merge 5 commits into
LumePart:devfrom
dammitjeff:remove-stale-persist-toggles

Conversation

@dammitjeff

@dammitjeff dammitjeff commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

PERSIST was incredibly confusing for users and devs to understand whats going on, and made it difficult to debug features since true meant "don't delete" false meant "delete and replace." The UI already had to double-invert just for it to make sense for end-users. Not good lol.

Swapped out the --persist flag with a new env, and wired it up to the settings.jsx page.

REPLACE_PLAYLIST=true - Delete old playlist, Create new one (this is now default)
REPLACE_PLAYLIST=false - Keep old playlist, Create new one alongside old playlist

Also added a one time migration in server.go to help convert existing "persist" values for anyone that was already using it, on startup. Will delete at a later date once people are migrated over.

Also removed stale --persist toggles in the frontend as they're now redundant with the toggles in settings.

Comment thread src/config/config.go
func (cfg *Config) GenPlaylistDetails() {

cfg.ClientCfg.PlaylistName = getPlaylistName(cfg.Flags.Playlist, cfg.ClientCfg.PlaylistNFormat, cfg.Persist)
cfg.ClientCfg.PlaylistName = getPlaylistName(cfg.Flags.Playlist, cfg.ClientCfg.PlaylistNFormat, cfg.ReplacePlaylist)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PERSIST was originally a .env toggle. I switched it to a flag to give users more control over playlist creation (e.g., keep weekly exploration playlists while replace daily jams).

The naming could've been better I agree 😅

I think it would make sense if the option stayed as a flag (renamed to --replace for example?). (It currently logs that --replace is deprecated)

Users can then still configure their schedules in settings and decide, on a playlist basis, whether they should be replaced or kept.

In the future we can polish it when we move to a more UI-centric settings page

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a general comment. I noticed that the code still uses the --replace flag when it's set, so the deprecation notice is what irked me 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good idea tbh, we could totally make it playlist specific and keep it as a flag. Okay, yeah let me see what I can do

Also yeah I'll remove the --replace depreciation notice lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants